# -*- coding: utf-8 -*-
__author__ = 'guo'

# from views import *
from controler import index, user, admin, other

import os.path

TEMPLATE_PATH = os.path.join(os.path.dirname(__file__), "templates")
STATIC_PATH = os.path.join(os.path.dirname(__file__), "static")

HANDLERS = [
    # 首页模块
    (r"/", index.Index),
    (r"/detail/", index.Detail),
    (r"/comment", index.Comment),
    (r"/search", index.Search),

    # 用户名模块
    (r"/user", user.User),
    (r"/user/profile", user.UserEdit),
    (r"/user/login/", user.UserLogin),
    (r"/user/logout", user.UserLogout),
    (r"/user/reg/", user.UserReg),
    (r"/user/post", user.UserPost),

    # 上传
    (r"/uploadfile", other.UploadFile),


    (r"/user/favorites", user.UserFavorites),
    (r"/user/pm", user.UserReg),
    (r"/user/goods", user.UserReg),
    (r"/user/order", user.UserReg),
    (r"/user/money", user.UserReg),
    (r"/user/cash", user.UserReg),
    (r"/user/affiliate", user.UserReg),
    (r"/user/profile", user.UserReg),



    # 后台管理
    (r"/admin", admin.Admin),
    (r"/admin/catelog", admin.Catelog),
    (r"/admin/user", admin.User),


    (r"/.*", other.Other),
]